const tokenKey = 'token'
const refreshTokenKey = 'refreshToken'
const expiresTimeKey = 'expiresTime'

export const setToken = (token) => {
	uni.setStorageSync(tokenKey, token)
}

export const getToken = () => {
	return uni.getStorageSync(tokenKey)
}

export const removeToken = () => {
	uni.removeStorageSync(tokenKey)
}

export const setRefreshToken = (refreshToken) => {
	uni.setStorageSync(refreshTokenKey, refreshToken)
}

export const getRefreshToken = () => {
	return uni.getStorageSync(refreshTokenKey)
}

export const removeRefreshToken = () => {
	uni.removeStorageSync(refreshTokenKey)
}

export const setExpiresTime = (expiresTime) => {
	uni.setStorageSync(expiresTimeKey, expiresTime)
}

export const getExpiresTime = () => {
	return uni.getStorageSync(expiresTimeKey)
}

export const removeExpiresTime = () => {
	uni.removeStorageSync(expiresTimeKey)
}